package com.lu.pojo.stream;

import java.io.IOException;

public class StandardInputOutput {
    public static void main(String[] args) throws IOException {
        System.out.println("请输入字符，回车结束:");
        byte[] buffer = new byte[512];
        int count = System.in.read(buffer);
        System.out.println("输出:");
        for (int i = 0; i < count; i++) {
            System.out.print(" "+ buffer[i]);
        }
        System.out.println();
        for (int i = 0; i < count; i++) {
            System.out.println((char)buffer[i]);
        }
        System.out.println("count="+count);

    }
}
